CMAKE_MINIMUM_REQUIRED( VERSION 2.8 )

PROJECT( sensor )

#SET( CMAKE_BUILD_TYPE RELEASE )
SET( CMAKE_BUILD_TYPE DEBUG )

SET( SRCS
  src/MJPEGClient.cpp
  src/RS232Motor.cpp
  src/Camera.cpp
)

SET( HEADERS
  src/MJPEGClient.h
  src/RS232Motor.h
  src/Camera.h
  src/Laser.h
)

FIND_PACKAGE( Qt4 COMPONENTS QtCore QtGui QtNetwork REQUIRED )
FIND_PACKAGE( OpenCV REQUIRED )

QT4_WRAP_CPP( HEADERS_MOC ${HEADERS} )

INCLUDE_DIRECTORIES( 
  ${QT_INCLUDES}
  ${OpenCV_INCLUDE_DIRS}
  ${CMAKE_INSTALL_PREFIX}
   
)

ADD_LIBRARY( sensor SHARED ${SRCS} ${HEADERS_MOC} )

TARGET_LINK_LIBRARIES( sensor 
  ${QT_LIBRARIES} 
  ${OpenCV_LIBS}
)

INSTALL( TARGETS sensor LIBRARY DESTINATION lib )
INSTALL( FILES ${HEADERS} DESTINATION include/sensor )


